<template>
  <div class="dashboard-container">
    <el-row :gutter="20">
      <el-col :span="14">
        <div class="grid-content bg-purple row1">
          <h4 class="title">机构概述</h4>
          <div class="overview">
            <div class="overview-left">
              <p class="name">西三旗分拣中心</p>
              <p class="adress">北京顺义区天澜综合保税区123号</p>
              <p class="people">负责人: 赵武金 16845458585</p>
              <el-button type="primary">查看营业部分布</el-button>
            </div>
            <div class="overview-right">
              <div class="col1">
                <p class="title">分拣中心</p>
                <div class="number">1</div>
                <p class="title">司机人数(个)</p>
                <div class="number">48</div>
              </div>
              <div class="col2">
                <p class="title">营业部</p>
                <div class="number">1</div>
                <p class="title">快递员数(个)</p>
                <div class="number">48</div>
              </div>
            </div>
          </div>
        </div>
      </el-col>
      <el-col :span="10">
        <div class="grid-content bg-purple row1">
          <h4 class="title">今日数据</h4>
          <div class="dailyData">
            <div class="dailyData-item">
              <p class="title">订单金额</p>
              <p class="number">2285</p>
              <p class="compare">较昨日 +342↑</p>
            </div>
            <div class="dailyData-item">
              <p class="title">订单金额</p>
              <p class="number">2285</p>
              <p class="compare">较昨日 +342↑</p>
            </div>
            <div class="dailyData-item">
              <p class="title">订单金额</p>
              <p class="number">2285</p>
              <p class="compare">较昨日 +342↑</p>
            </div>
          </div>
        </div>
      </el-col>
    </el-row>
    <el-row :gutter="20">
      <el-col :span="14">
        <div class="grid-content bg-purple row2">
          <h4 class="title">待办任务</h4>
          <div class="echarts">
            <echart-liqquid v-for="(i,index) in 4" :key="index" :index="index" />
          </div>
        </div>
      </el-col>
      <el-col :span="10">
        <div class="grid-content bg-purple row2">
          <h4 class="title">执行中任务</h4>
          <div class="echarts">
            <echart-liqquid v-for="(i,index) in 2" :key="index" :index="index" />
          </div>
        </div>
      </el-col>
    </el-row>
    <el-row :gutter="20">
      <el-col :span="24">
        <div class="grid-content bg-purple row3">
          <ul>
            <li v-for="(i,index) in 6" :key="index" class="functions">
              <i />
              <p>快递作业</p>
            </li>
          </ul>
        </div>
      </el-col>
    </el-row>
    <el-row :gutter="20">
      <el-col :span="12"><div class="grid-content bg-purple row4" /></el-col>
      <el-col :span="12"><div class="grid-content bg-purple row4" /></el-col>
    </el-row>
    <el-row :gutter="20">
      <el-col :span="12"><div class="grid-content bg-purple row5" /></el-col>
      <el-col :span="12"><div class="grid-content bg-purple row5" /></el-col>
    </el-row>
  </div>
</template>

<script>
import { mapGetters } from 'vuex'

import EchartLiqquid from '@/layout/components/EchartLiqquid.vue'

export default {
  name: 'Dashboard',
  components: { EchartLiqquid },
  data() {
    return {
      // myChart: echarts.init(this.$refs.liquid),
    }
  },
  computed: {
    ...mapGetters(['name'])
  },
  mounted() {
  },
  methods: {

  }
}
</script>

<style lang="scss" scoped>
.dashboard-container {
  padding: 0 24px 24px;

  .navbar {
    height: 70px;
    line-height: 70px;
  }

  .row1 {
    height: 234px;
    .title {
      margin-bottom: 16px !important;
    }
    .overview {
      display: flex;
      height: 154px;
      .overview-left {
        flex: 1;
        border-right: 1px solid #ebeef5;
        padding-left: 10px;
        .name {
          font-size: 16px;
          margin-top: 20px;
          margin-bottom: 13px;
          margin: 20px 0 13px;
        }
        .adress,.people {
          color: #818693;
          font-size: 14px;
        }
      }
      .overview-right {
        display: flex;
        justify-content: space-around;
        flex: 1;
        .title {
          font-size: 14px;
          margin-bottom: 10px;
        }
        .number {
          font-size: 32px;
          font-weight: 700;
          color: #e15536;
          cursor: pointer;
          margin-bottom: 20px;
        }
      }
    }
    .dailyData {
      display: flex;
      text-align: center;
      justify-content: space-around;
      .dailyData-item {
        display: flex;
        margin-top: 10px;
        flex-direction: column;
        .title {
          font-size: 14px;
          color: #20232a;
          margin-bottom: 21px !important;
        }
        .number {
        font-size: 36px;
        color: #20232a;
        font-weight: 700;
        margin-top: 0;
        margin-bottom: 24px;
        }
        .compare {
          font-size: 14px;
          color: #818693;
          margin-top: 0 !important;
          margin-bottom: 20px;
          display: -webkit-box;
          display: -ms-flexbox;
          display: flex;
          -webkit-box-pack: center;
          -ms-flex-pack: center;
          justify-content: center;
          padding-left: 9px;
        }
      }
    }
  }

  .row2 {
    height: 290px;

    .echarts {
      display: flex;
      justify-content: space-evenly;
    }
    }

  .row3 {
    height: 190px;
    ul {
    display: flex;
    justify-content: space-evenly;
    list-style: none;
    }
    .functions {
      display: flex;
      flex-direction: column;
      text-align: center;
      width: 175px;
      height: 110px;
      background-color: #fafafb;

    }
  }

  .row4 {
    height: 490px;
  }

  .row5 {
    height: 580px;
  }

  .el-row {
    margin-bottom: 20px;
    &:last-child {
      margin-bottom: 0;
    }
  }

  .bg-purple-dark {
    background: #99a9bf;
  }
  .bg-purple {
    background: #fff;
  }
  .bg-purple-light {
    background: #e5e9f2;
  }
  .grid-content {
    padding: 23px 20px;
    border-radius: 4px;
    min-height: 36px;

    .title {
      margin: 0;
    }
  }
  .row-bg {
    padding: 10px 0;
    background-color: #f9fafc;
  }
}
</style>
